package com.blueheart.music.mapper;

import com.blueheart.music.model.pojo.SongList;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;

import javax.validation.constraints.Max;
import java.util.List;

@Mapper
@Repository
public interface SongListMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SongList record);

    int insertSelective(SongList record);

    SongList selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SongList record);

    int updateByPrimaryKeyWithBLOBs(SongList record);

    int updateByPrimaryKey(SongList record);

    /**
     * 查询全部歌单
     * @return
     */
    List<SongList> selectAll();

    /**
     * 模糊查询歌单
     * @param title
     * @return
     */
    List<SongList> selectFromList(String title);

    /**
     * 精准查询歌单
     * @param title
     * @return
     */
    SongList selectByName(String title);

    /**
     * 根据风格查询歌单
     * @param style
     * @return
     */
    List<SongList> selectByStyle(String style);

}